import { axios } from '@/utils/request'
export function getStaffList(parameter) {
  return axios({
    url: '/sys/hr/enterprise/enterpriseId/' + parameter.enterpriseId,
    method: 'get',
  })
}
export function saveModuleDefine(parameter) {
  return axios({
    url: '/sys/hr/enterprise/saveModuleDefine',
    method: 'post',
    data: parameter
  })
}
export function updateModule(parameter) {
  return axios({
    url: '/sys/hr/enterprise/updateModule',
    method: 'post',
    data: parameter
  })
}
export function deleteModuleByModuleId(parameter) {
  return axios({
    url: '/sys/hr/enterprise/deleteModuleByModuleId',
    method: 'post',
    data: parameter
  })
}
export function addConfig(parameter) {
  return axios({
    url: '/sys/hr/enterprise/saveFieldDefine',
    method: 'post',
    data: parameter
  })
}
export function editConfig(parameter) {
  return axios({
    url: '/sys/hr/enterprise/updateField',
    method: 'post',
    data: parameter
  })
}
export function deleteFieldByFieldId(parameter) {
  return axios({
    url: '/sys/hr/enterprise/deleteFieldByFieldId',
    method: 'post',
    data: parameter
  })
}
export function batchDeleteFieldByFieldId(parameter) {
  return axios({
    url: '/sys/hr/enterprise/batchDeleteFieldByFieldId',
    method: 'post',
    data: parameter
  })
}
export function queryFieldsDetail(parameter) {
  return axios({
    url: '/sys/hr/enterprise/queryFieldsDetail/' + parameter.fieldId,
    method: 'get'
  })
}
export function queryStaffInfoByStaffId(parameter) {
  return axios({
    url: '/sys/hr/enterprise/queryStaffInfoByStaffId',
    method: 'post',
    data: parameter
  })
}
export function queryHrStaffInsureInfo(parameter) {
  return axios({
    url: '/sys/hr/insure/staff/queryHrStaffInsureInfo',
    method: 'post',
    data: parameter
  })
}
export function queryEnterpriseStaffFile(id) {
  return axios({
    url: `/sys/hr/enterpriseStaffFile/query/${id}`,
    method: 'get',
  })
}
export function enterpriseStaffFileDelete(parameter) {
  return axios({
    url: '/sys/hr/enterpriseStaffFile/delete',
    method: 'post',
    data: parameter
  })
}
export function queryStaffModuleInfo(parameter) {
  return axios({
    url: '/sys/hr/enterprise/queryStaffModuleInfo',
    method: 'post',
    data: parameter
  })
}
export function savaModuleInfo(parameter) {
  return axios({
    url: '/sys/hr/enterprise/savaData',
    method: 'post',
    data: parameter
  })
}

// 薪资
export function getSalaryList(parameter) {
  return axios({
    url: '/sys/salaryDynamicField/getFields/' + parameter.enterpriseId,
    method: 'get',
  })
}
export function savaFieldInfo(parameter) {
  return axios({
    url: '/sys/salaryDynamicField/add',
    method: 'post',
    data: parameter
  })
}
export function updateFieldInfo(parameter) {
  return axios({
    url: '/sys/salaryDynamicField/update',
    method: 'post',
    data: parameter
  })
}
export function deleteFieldInfo(parameter) {
  return axios({
    url: '/sys/salaryDynamicField/delete',
    method: 'post',
    data: parameter
  })
}